package bb.lanxing.device.sgdevcie.tool;

import androidx.fragment.app.FragmentManager;
//import com.alipay.sdk.authjs.a;
import bb.lanxing.R;
import bb.lanxing.util.ui.ChoiceBottomSheetFragment;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;

public final class BluetoothPermissionDialog {
    public static final BluetoothPermissionDialog INSTANCE = new BluetoothPermissionDialog();

    private BluetoothPermissionDialog() {
    }

    public final ChoiceBottomSheetFragment show(FragmentManager manager, ChoiceBottomSheetFragment.ChoiceBottomSheetFragmentActionHandler callback) {
        Intrinsics.checkNotNullParameter(manager, "manager");
        Intrinsics.checkNotNullParameter(callback, "callback");
        ChoiceBottomSheetFragment create = create(manager, callback);
        try {
            create.show(manager, "BluetoothPermissionDialog");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return create;
    }

    public final ChoiceBottomSheetFragment create(FragmentManager manager, ChoiceBottomSheetFragment.ChoiceBottomSheetFragmentActionHandler callback) {
        Intrinsics.checkNotNullParameter(manager, "manager");
        Intrinsics.checkNotNullParameter(callback, "callback");
        ChoiceBottomSheetFragment.Companion companion = ChoiceBottomSheetFragment.Companion;
        ChoiceBottomSheetFragment.ChoiceBean choiceBean = new ChoiceBottomSheetFragment.ChoiceBean();
        choiceBean.setHandler(callback);
        choiceBean.setIcon(R.drawable.ic_permission_ble);
        choiceBean.setPageTitle(R.string.st_allow_permissions);
        choiceBean.setTitle(R.string.st_bluetooth_permisson_title);
        choiceBean.setDes(R.string.st_bluetooth_permission_des);
        choiceBean.setPositiveBt(R.string.st_allow);
        choiceBean.setNegativeBt(R.string.st_skip);
        return companion.newInstance(choiceBean);
    }
}
